package com.hotel.homehotel.before.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hotel.homehotel.before.entiy.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface PermissionMapper  extends BaseMapper<Permission> {
    @Select("select permission_id as id,url from permission where permission_id in (select pid  from role_permission where rid in (select rid from user_role where uid =(select id from user WHERE phone_number=#{username} )))")
    public List<Permission> getPermissionMapperByUsername(String username);

}

